package com.telecom.cms.service;

import java.util.List;
import com.telecom.cms.dao.CampShowAreaDAO;
import com.telecom.cms.dto.CampShowArea;
import com.telecom.cms.dao.CampSegDAO;

public class CampShowAreaMgr {
   
	public void save(CampShowArea campcamp){
		(new CampShowAreaDAO()).insert(campcamp);
	}
	
	public void  delete(CampShowArea campcamp){
		(new CampShowAreaDAO()).delete(campcamp);
		(new CampSegDAO()).deleteById(String.valueOf(campcamp.getCampId()), String.valueOf(campcamp.getShowAreaId()));
	}
	
	public List findall(){
		List result=(new CampShowAreaDAO()).findAll();
		return result;
	}
	
	public CampShowArea findbyid(String areaid){
		CampShowArea result=(new CampShowAreaDAO()).findById(Integer.parseInt(areaid));
		return result;
	}
	
	public List findall(String campid){
		List result=(new CampShowAreaDAO()).findAll(campid);
		return result;
	}
}
